Use a fixed version from the master branch of flask-profiler. #93
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This error seen in production:
was a result of v1.8.1 of flask profiler defining the elasped time field as NUMERIC(6, 4) which means a total of 6 digits with 4 after the decimal point, i.e. max value 99.9999. Very long lasting queries like the 182 second example here exceed this limit and cause an error.
This PR uses the head of the master branch of the flask profiler which has a larger capacity to store elapsed time than the 1.8.1 tag, allowing recording of queries lasting up to 1,000,000 seconds (about 11 days) rather than 100 seconds.
We should also modify the live database table to make this change without re-creating the flask profiler table, i.e.
ALTER TABLE flask_profiler_measurements ALTER COLUMN elapsed TYPE NUMERIC(10,4);